package org.jumiz.dbview.own.service;

import org.jumiz.dbview.own.entity.ConnectEntity;
import org.jumiz.dbview.own.vo.SubMenuVo;
import reactor.core.publisher.Mono;

import java.sql.Connection;
import java.util.List;
import java.util.Map;

public interface DatabasesService {

    Mono<Boolean> testConnection(ConnectEntity entity);

    List<SubMenuVo> getMenusData(ConnectEntity entity);

    Connection getConnection(ConnectEntity entity) throws Exception;

    List<String> getColumns(ConnectEntity entity, String schemaName, String tableName);

    List<Map<String, Object>> getTableData(ConnectEntity entity, String tableName, List<String> columns);
}
